//
// Created by gg on 2023/11/8.
//

#ifndef PROJECT_BSP_CAN_H
#define PROJECT_BSP_CAN_H

#include "can.h"

class  CAN_Object {
public:
    CAN_HandleTypeDef *hcan;
    CAN_TxHeaderTypeDef	TxHeader;
    uint8_t Moter_ID =0;
    uint8_t	Rx_Data[8];
    uint8_t	Tx_Data[8];

    const static uint32_t S2M_ID1 = 0X200,S2M_ID2 = 0X1FF;
    void CAN_Init(CAN_HandleTypeDef *hcan);
    uint8_t CAN_Send_Data();
};

extern void CAN_FilterInit(CAN_HandleTypeDef *hcan);
extern CAN_RxHeaderTypeDef RxHeader1;
extern CAN_RxHeaderTypeDef RxHeader2;


#endif //PROJECT_BSP_CAN_H
